package com.dongwu.manager.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import com.dongwu.common.entity.BaseEntity;

/**
 * 意见反馈
 * @author xyj
 * @date 2017年10月16日
 */
@Entity
public class FeedBack extends BaseEntity<String>{
	//意见内容
 	@Column(columnDefinition = "Text")
	private String content;
	
	//联系手机
	private String mobilePhone;
	
	//联系邮箱
	private String email;
	
	public enum stateType{
		//已读
		read,
		
		//未读
		unread
		
	}
	//反馈消息状态
	private stateType state;
	
	//意见来源的设备
	@ElementCollection
	@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
	@JoinColumn(name="devId")
	private Device device;


	public String getMobilePhone() {
		return mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public stateType getState() {
		return state;
	}

	public void setState(stateType state) {
		this.state = state;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Device getDevice() {
		return device;
	}

	public void setDevice(Device device) {
		this.device = device;
	}
	
}
